<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  
 </body>
</html>
<script>
var n = parseInt(prompt('请输入数字'));
var sum = 0;
for (var a=2;a<=n ;a++ )
{
	sum += (a+1)/a
};
alert('计算结果为'+sum)
</script>

